package com.zb.vo;

import com.zb.utils.VerificUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * @Author WEN
 * @Date 2023/7/18 0018
 **/
@Data
@ApiModel("注册账号实体")
public class RegisterAccountVo {

    @NotBlank(message = "账号名称不能为空")
    @Length(max = 100, message = "账号名称字符长度限制在100个以内")
    @ApiModelProperty(value = "账号名称", required = true)
    private String name;

    @Length(max = 100, message = "昵称字符长度限制在100个以内")
    @ApiModelProperty(value = "昵称", required = true)
    private String nickname;

    @Pattern(regexp = VerificUtil.REGEX_PHONE, message = "手机号格式不正确")
    @ApiModelProperty(value = "手机号", required = true)
    private String phone;


    @NotBlank(message = "密码不能为空")
//    @Pattern(regexp = VerificUtil.PASSWORD_RULE, message = "密码格式不正确，请输入不少于六位并包含数字、大小字母、特殊字符的密码")
    @Length(max = 500, message = "账号名称字符长度限制在500个以内")
    @ApiModelProperty(value = "密码", required = true)
    private String password;

    @NotBlank(message = "验证码不能为空")
    @ApiModelProperty(value = "验证码", required = true)
    private String code;
}
